<div class="wrapper col2"><!-- Start slider area -->

	<div id="main" class="container">

			<div class="main-image"><!-- Big Image -->
				<?php echo '<img src="/images/slider/'.$information[0]['image'].'" alt ="banner one">'; ?>
				<div class="desc">
					<a class="collapse" href="#">close me!</a>
					<div class="block">
						<h2><?php echo $information[0]['title']; ?></h2>
						<?php echo '<small>'.date("d/m/Y",strtotime($information[0]['date'])).'</small>' ?>
					
						<?php $this->widget('application.components.Subwords',array('str'=>$information[0]["text"],'count'=>220))?>
						<p>
						<?php echo '<a class="blind" href="/information/read/'.$information[0]["id"].'">читать полностью</a>'; ?>
						</p>
					</div>
				</div>
		    </div><!-- end big image -->
		    
		    <div class="thumb-image"><!-- right image bar -->
			<ul>
			<?php foreach ($information as $key) {?>
			
				<li>
				<?php $i=$key->image?>
				<?php $i=trim($i);  ?>
				<?php $img=preg_split('/[.]+/',$i, -1, PREG_SPLIT_NO_EMPTY); ?>
				
				<?php echo '<a href="/images/slider/'.$key->image.'"><img alt="1" src="/images/slider/'.$img[0].'_thumb.'.$img[1].'"></a>'; ?>
					<div class="block">
						<h2><?php echo $key->title; ?></h2>
						<?php echo '<small>'.date("d.m.Y H:i",strtotime($key->date)).'</small>' ?>
						
							<?php $this->widget('application.components.Subwords',array('str'=>$key->text,'count'=>220))?>
							<p>
							<?php echo '<a class="blind" href="/information/read/'.$key->id.'">читать полностью</a>'; ?>
							</p>
					</div>
				</li>
				
				<?php }?>
			</ul>
		</div><!-- end right image bar -->
	
	</div>	
</div><!-- end slider area -->


<!--  -->
<div class="wrapper col3">
    <div id="homecontent">
        <div class="fl_left">
            <div class="column2"><!-- start news block -->
                <!-- <h2>Последние новости!</h2> -->
                <?php
                    //Вывод последних новостей
                    foreach ($news as $key) {
                       echo "<div id='news'>";

                        echo "<div id='post-title'><h3><a href='/news/read/".$key->id_news."' title='link'>".$key->title."</a></h3></div>";
                        if ($key->image!="") {
                        	 echo "<div class='post_image'><img class='imgl' src='/images/news/".$key->image."'  alt='news' /></div>"; 
                        }
                        else
                        { 
                        	echo "<div class='post_image'><img class='imgl' src='/images/news/imgl.gif'  alt='news' /></div>";  
                        }                 
                        echo '<div class="preview"><ul class="postmetadata"><li class="author">Автор <a href="#">'.$key->User->username.'</a></li>';
                        echo '<li>';
                        $this->widget('application.components.Date',array('dat'=>$key->date));
                        
                        echo '</li>';
                        echo '<li>';
                            $this->widget('application.components.CountComent',array('type'=>"news",'id'=>$key->id_news));
                    	echo '</li></ul>';
                    	$this->widget('application.components.Subwords',array('str'=>$key->text,'count'=>700));
                    
                        echo "</div></div>";
                        
                    }
                ?>
            </div><!-- end news block -->
        </div>
        <div class="fl_right"><!-- sidebar -->
            <h2>Вакансии</h2>

			<div class="block">
			<ul class="vac">
			<?php  foreach ($uservacancy as $key) {   ?>

				<li class="V">
					<div id="imgholder">
						<!-- <a href="" title="img title"> -->
							<?php echo '<img src="/images/demo/calday.png" alt="testing" />'.date("d.m.Y",strtotime($key->date)).'&nbsp<strong><a href="/vacancy/read/'.$key->job_id.'" title="link">'.$key->position.'</a></strong>'; ?>
						<!--  </a> -->
					</div>
					<div class="hide" style="display:none;">
					<p>
					<?php $this->widget('application.components.Subwords',array('str'=>$key->responsibility,'count'=>200)); ?>
					</p>
					</div>
				</li>

			<?php }?>
			</ul>
			</div><!-- end div "block" -->
			
			<h2>Реклама</h2>
			<!-- Featured block in this widget -->
			<?php $this->widget('application.components.IndexAdvertisement',array('index'=>true)); ?>
        </div><!-- end sidebar -->
    </div>
</div>
<!-- end preview 2 post's -->
